<template>
  <div style="width:100%;height:100%;overflow: hidden;">
    <div class="page-header-index-wide" v-if="roleData.indexOf('centerDashBoard') !== -1">
      <!-- 机构数据 -->
      <a-spin :spinning="loading" :delay="1000">
        <a-card :bordered="false" :bodyStyle="{ padding: '16px 24px' }" style="margin-bottom:20px; overflow: auto;">
          <div class="topData">
            <div class="topDataTitle">
              <span style="font-size:18px;color:#666;">机构数据</span>
              <span>
                <a-icon type="eye" style="margin-left:20px;" @click="showOrHidden = !showOrHidden" />
              </span>
            </div>
            <div class="topDataDisplayFlex">
              <div class="topDataDesc">
                <div class="topDataDescPrice">
                  <span v-if="showOrHidden">￥{{ topData.month_price }}</span>
                  <span v-else>****</span>
                </div>
                <div class="topDataDescText">本月收入</div>
              </div>
              <div class="topDataDesc">
                <div class="topDataDescPrice">
                  <span v-if="showOrHidden">￥{{ topData.month_class_consume || 0 }}</span>
                  <span v-else>****</span>
                </div>
                <div class="topDataDescText">本月课消金额</div>
              </div>
              <div class="topDataDesc">
                <div class="topDataDescPrice">
                  <span v-if="showOrHidden">{{ topData.todayComeStudent }}</span>
                  <span v-else>****</span>
                </div>
                <div class="topDataDescText">今日实到</div>
              </div>
              <div class="topDataDesc">
                <div class="topDataDescPrice">
                  <span v-if="showOrHidden">{{ topData.todayNotComeStudent }}</span>
                  <span v-else>****</span>
                </div>
                <div class="topDataDescText">今日未到</div>
              </div>
            </div>
          </div>
        </a-card>
        <!-- 快捷入口&&待办事项 -->
        <a-row>
          <!-- 快捷入口 -->
          <a-col :span="16">
            <a-card :bordered="false" style="margin-bottom:20px;flex-grow:2;" :bodyStyle="{ padding: '16px 24px' }">
              <div class="quickAccess">
                <div class="quickAccess_top">
                  <span class="quickAccess_top_left" style="margin-bottom: 25px;">快捷入口</span>
                </div>
                <div class="quickAccess_content">
                  <div v-for="(item, index) in indexRoleList" :key="index" class="quickAccess_content_element"
                    v-if="roleData.indexOf(item.key) !== -1" @click="$router.push({ name: item.key })">
                    <div class="quickAccess_content_element_small">
                      <div :class="'fast-enter-icon  ' + `${item.cssName}`"></div>
                      <div class="rightContent">{{ item.name }}</div>
                    </div>
                  </div>
                </div>
              </div>
            </a-card>
          </a-col>
          <!-- 待办事项 -->
          <a-col :span="8">
            <a-card :bordered="false" :bodyStyle="{ padding: '16px 24px' }"
              style="margin-bottom:20px;margin-left:20px;flex-grow:3;">
              <div class="backLog">
                <div class="backLog_title">待办事项</div>
                <div class="backLog_list">
                  <a-list :split="false" size="small">
                    <a-list-item
                      v-if="roleData.indexOf('renewalReminder_index') !== -1 && toDoingThings.reading_students !== 0">
                      <a @click="roleData.indexOf('student_file') !== -1 && $router.push({
                        name: 'renewalReminder_index'
                      })">
                        <a-tag color="#00c6c4">续费</a-tag>
                        有{{ toDoingThings.reading_students }}位学员需要通知续费
                      </a>
                    </a-list-item>
                    <a-list-item v-if="roleData.indexOf('order') !== -1 && toDoingThings.potential_students !== 0">
                      <a @click="$router.push({
                        name: 'order'
                      })">
                        <a-tag color="#00c6c4">欠费</a-tag>
                        有{{ toDoingThings.potential_students }}位学员欠费补交
                      </a>
                    </a-list-item>
                    <a-list-item
                      v-if="roleData.indexOf('student_file') !== -1 && toDoingThings.wait_follow_students !== 0">
                      <a @click="$router.push({
                        name: 'potential_student'
                      })">
                        <a-tag color="#5c56ef">跟进</a-tag>
                        今日有{{ toDoingThings.wait_follow_students }}条学员待跟进事项
                      </a>
                    </a-list-item>
                    <a-list-item
                      v-if="roleData.indexOf('student_file') !== -1 && toDoingThings.no_follow_students !== 0">
                      <a @click="$router.push({
                        name: 'potential_student'
                      })">
                        <a-tag color="#5c56ef">分配</a-tag>
                        有{{ toDoingThings.no_follow_students }}位学员未分配跟进人员
                      </a>
                    </a-list-item>
                    <a-list-item v-if="roleData.indexOf('class') !== -1 && toDoingThings.not_scheduled_class !== 0">
                      <a @click="$router.push({
                        name: 'class_list'
                      })">
                        <a-tag color="#20a1ff">排课</a-tag>
                        有{{ toDoingThings.not_scheduled_class }}个班级未排课
                      </a>
                    </a-list-item>
                    <!-- <a-list-item v-if="toDoingThings.no_call_class!==0">
                    <a>
                      <a-tag color="#5c56ef">点名</a-tag>
                      本周有{{toDoingThings.no_call_class}}个课次超时未点
                    </a>
                    </a-list-item>-->
                    <a-list-item v-if="roleData.indexOf('course_charge') !== -1 && toDoingThings.no_stock_goods !== 0">
                      <a @click="$router.push({ name: 'items_list', query: { no_stock: true } })">
                        <a-tag color="#00c6c4">库存</a-tag>
                        有{{ toDoingThings.no_stock_goods }}个物品达到库存预警
                      </a>
                    </a-list-item>
                  </a-list>
                </div>
              </div>
            </a-card>
          </a-col>
        </a-row>
        <!-- 跟进数据  表格 -->
        <a-card :bordered="false" :bodyStyle="{ padding: '10px 24px' }" style="margin-bottom:20px;">
          <div class="followUp" style="position:relative;">
            <a-tabs :default-active-key="1" @change="followUpChange">
              <a-tab-pane :key="1" tab="今日待跟进"></a-tab-pane>
              <a-tab-pane :key="2" tab="过去未完成"></a-tab-pane>
              <a-tab-pane :key="3" tab="过去已完成"></a-tab-pane>
              <a-tab-pane :key="4" tab="以后待跟进"></a-tab-pane>
            </a-tabs>
            <a-radio-group style="position:absolute;top:0;right:0;" v-model="queryParam.user_type">
              <a-radio-button :value="0">全部</a-radio-button>
              <a-radio-button :value="1">我跟进的</a-radio-button>
            </a-radio-group>
            <div class="followUpAlert">
              <span class="followUpAlert_span">
                未完成
                <span class="followUpNum">{{ followUpCount.unComplete }}</span>
                条
              </span>
              <span class="followUpAlert_span">
                已完成
                <span class="followUpNum">{{ followUpCount.complete }}</span>
                条
              </span>
            </div>
            <s-table ref="follow" size="default" :columns="columns" :data="loadData" class="user_management_table">
              <span slot="action" slot-scope="text,record" v-if="record.is_complete !== 1">
                <a @click="followUp(record)">跟进</a>
              </span>
              <span slot="action" v-else>
                <a disabled>已跟进</a>
              </span>
            </s-table>
          </div>
        </a-card>

        <!-- 销售漏斗&&学员组成 -->
        <a-row>
          <a-col :span="16">
            <!-- 销售数据 -->
            <a-card :bordered="false" style="margin-bottom:20px;flex-grow:2;" :bodyStyle="{ padding: '16px 24px' }">
              <div class="saleTitle">销售漏斗</div>
              <div class="saleData">
                <a-row>
                  <a-col :span="8">
                    <div class="saleData_funnel" style="position:relative;">
                      <ve-funnel :data="chartData"></ve-funnel>
                      <div class="saleData_count_per" style="position:absolute;top:280px;">
                        <span style="color:#999;">成交率:</span>
                        {{ funnelObj.turnover_rate || '--' }}
                        <br />
                        <span style="color:#999;">流失率:</span>
                        {{ funnelObj.loss_rate || '--' }}
                      </div>
                    </div>
                  </a-col>
                  <a-col :span="16">
                    <div class="saleData_Tortuous">
                      <ve-line :data="chartDataTortuous" style="width:93% !important;">
                      </ve-line>
                      <a-select :defaultValue="1" style="width: 120px" @change="reloadTortuousCharts" size="small"
                        class="screen">
                        <a-select-option :value="1">近15天</a-select-option>
                        <a-select-option :value="2">近6个月</a-select-option>
                      </a-select>
                    </div>
                  </a-col>
                </a-row>
              </div>
            </a-card>
          </a-col>

          <!-- 学员数据 -->
          <a-col :span="8">
            <a-card :bordered="false" :bodyStyle="{ padding: '16px 24px' }"
              style="margin-bottom:20px;margin-left:20px;flex-grow:3;">
              <div class="studentData">
                <div class="studentData_title">
                  <div style="margin-bottom:10px;">学员组成</div>
                </div>
                <div class="studentData_Echarts">
                  <ve-ring :data="chartDataPie"></ve-ring>
                  <div class="studentData_Echarts_select">
                    <a-select :defaultValue="1" style="width: 120px;top:-30px;right:0" @change="reloadPieCharts"
                      size="small">
                      <a-select-option :value="1">近30天</a-select-option>
                      <a-select-option :value="2">近7天</a-select-option>
                      <a-select-option :value="3">昨天</a-select-option>
                    </a-select>
                  </div>
                </div>
              </div>
            </a-card>
          </a-col>
        </a-row>
      </a-spin>
      <a-modal :visible="creat_visible" title="添加跟进记录" @ok="sure" @cancel="creat_visible = false"
        :confirmLoading="btnLoading" :bodyStyle="{ 'max-height': '400px', 'overflow-y': 'auto' }">
        <a-form-model ref="ruleForm" :model="form" :rules="rules" :label-col="labelCol" :wrapper-col="wrapperCol">
          <a-form-model-item label="跟进内容" prop="content">
            <a-textarea v-model="form.content" placeholder="请输入跟进内容" :maxLength="1000"
              :auto-size="{ minRows: 3, maxRows: 5 }" />
          </a-form-model-item>
          <a-form-model-item label=" " :colon="false" style="margin-bottom:0;">
            <a-upload :before-upload="beforeUploadImg" list-type="picture-card" :file-list="fileList"
              :remove="removePic">
              <div v-if="fileList.length < 9">
                <a-icon type="plus" />
                <div class="ant-upload-text">上传图片</div>
              </div>
            </a-upload>
            <a-modal :visible="previewVisible" :footer="null" @cancel="previewVisible = false">
              <img alt="example" style="width: 100%" :src="previewImage" />
            </a-modal>
          </a-form-model-item>
          <a-form-model-item label="下次跟进">
            <a-date-picker v-model="time" show-time format="YYYY-MM-DD HH:mm" placeholder="选择时间" @change="changeTime"
              :disabled-date="disabledDate" />
          </a-form-model-item>
        </a-form-model>
        <div class="lastFollow" v-if="lastInfo">
          <div class="title">上次跟进记录</div>
          <div class="userInfo">
            <span class="user" style="margin-right:15px;">
              <a-icon type="user" style="margin-right:10px;color:#ccc;" />
              <span v-if="lastInfo.user && lastInfo.user.name"></span>
              <span v-else>--</span>
            </span>
            <!-- <span class="time">
            <a-icon type="clock-circle" style="margin-right:10px;color:#ccc;" />
            </span>-->
          </div>
          <div class="followUpContent">
            <span v-if="lastInfo.content">{{ lastInfo.content }}</span>
            <span v-else>--</span>
          </div>
        </div>
      </a-modal>
    </div>
    <div style="width:100%;height:100%;overflow: hidden;background: #fff;" v-else>
      <a-result status="403" title="暂无权限" sub-title="">
      </a-result>
    </div>
  </div>
</template>

<script>
import moment from 'moment'
// import VeArea from './path/to/VeArea.vue';
import { STable } from '@/components'
import { uploadPic } from '@/api/login'
import { studentFollowAdd } from '@/api/student'
import {
  organTopCountData,
  toDoing,
  followUp,
  funnelChart,
  lineChart,
  ringChart,
  followUpCount,
} from '@/api/dashboardCount'
import { settings } from 'nprogress'
//待办事项列表
export default {
  name: 'Analysis',
  components: {
    STable,
  },

  data() {
    return {
      loading: true,
      showOrHidden: true,
      topData: {
        month_price: 0,
        month_class_consume: '',
        todayComeStudent: 0,
        todayNotComeStudent: 0,
      },
      //学生饼图
      chartDataPie: {
        columns: ['type', 'num'],
        rows: [
          { type: '在读学员', num: 0 },
          { type: '潜在学员', num: 0 },
        ],
      },
      //销售漏斗
      chartData: {
        columns: ['state', 'data'],
        rows: [
          { state: '待跟进', data: 0 },
          { state: '跟进中', data: 0 },
          { state: '已约课', data: 0 },
          { state: '已体验', data: 0 },
        ],
      },
      funnelObj: {
        turnover_rate: '',
        loss_rate: ''
      },
      // 折线图
      chartDataTortuous: {
        columns: ['date', '新增学员', '失效资源'],
        rows: [
          { date: '1/1', 新增学员: 0, 失效资源: 0 }
        ],
        settings: {
          line: [
            {
              name: '新增学员',
              itemStyle: {
                color: '#ff0000' // 线条颜色
              },
              areaStyle: {
                color: 'rgba(255, 0, 0, 0.5)' // 填充颜色
              }
            },
            {
              name: '失效资源',
              itemStyle: {
                color: '#00ff00' // 线条颜色
              },
              areaStyle: {
                color: 'rgba(0, 255, 0, 0.5)' // 填充颜色
              }
            }
          ]
        }
      },
      toDoingThings: {
        reading_students: 0,
        potential_students: 0,
        no_follow_students: 0,
        not_scheduled_class: 0,
        no_call_class: 0,
        no_stock_goods: 0
      },
      //跟进数据表格
      columns: [
        {
          title: '学员姓名',
          dataIndex: 'student.name',
          ellipsis: true,
          align: 'center'
        },
        {
          title: '手机号',
          dataIndex: 'student.main_phone',
          ellipsis: true,
        },
        {
          title: '上次跟进内容',
          dataIndex: 'last.content',
          ellipsis: true,
          align: 'center',
        },
        {
          title: '上次跟进人',
          dataIndex: 'last.user.name',
          ellipsis: true,
          align: 'center',
        },
        {
          title: '时间安排',
          dataIndex: 'time',
          ellipsis: true,
          align: 'center',
        },
        {
          title: '操作',
          dataIndex: 'action',
          scopedSlots: { customRender: 'action' },
        },
      ],
      queryParam: {
        user_type: 0,
        type: 1,
        school_id: this.$store.state.user.school,
      },
      loadData: (parameter) => {
        return followUp(Object.assign(parameter, this.queryParam)).then((res) => {
          return res
        })
      },
      followUpCount: {
        unComplete: 0,
        complete: 0,
      },
      //添加跟进记录   model和数据
      fileList: [], //上传的资源  数组
      previewImage: '',
      previewVisible: false,
      time: null,
      creat_visible: false,
      lastInfo: null,
      studentID: null, //跟进学生的ID
      btnLoading: false, //确定按钮loading
      form: {
        content: '',
        time: '',
      },
      rules: {
        content: [{ required: true, message: '请输入跟进内容', trigger: 'blur' }],
      },
      labelCol: { span: 4 },
      wrapperCol: { span: 20 },
      roleData: [], //用户权限列表
      indexRoleList: [
        {
          name: '学员管理',
          key: 'classRecond_index',
          cssName: 'xygl',
        },
        {
          name: '课表',
          key: 'lesson_table',
          cssName: 'xygl1',
        },
        {
          name: '点名记录',
          key: 'classRecondList_index',
          cssName: 'xygl2',
        },
        {
          name: '潜在学员',
          key: 'student_file',
          cssName: 'xygl3',
        },
        {
          name: '试听记录',
          key: 'listen_index',
          cssName: 'xygl4',
        },
        {
          name: '通知管理',
          key: 'msgManage',
          cssName: 'xygl5',
        },
        {
          name: '课后作业',
          key: 'homeSchool',
          cssName: 'xygl6',
        },
        {
          name: '报名续费',
          key: 'apply',
          cssName: 'xygl7',
        },
        {
          name: '订单管理',
          key: 'order',
          cssName: 'xygl8',
        },
      ], // 首页权限列表
      data: [], //待办事项列表
    }
  },
  created() {

    this.loading = !this.loading
    this.roleData = this.$store.getters.roles.permissionList
    // console.log(this.roleData)
    // debugger
    this.getData()
  },
  watch: {
    'queryParam.user_type'(val) {
      this.getData()
      this.$refs.follow.refresh(true)
    },
    'queryParam.type'() {
      this.$refs.follow.refresh(true)
      this.getData()
    },
    creat_visible(val) {
      if (val == false) {
        this.btnLoading = false
        this.form.time = null
        this.time = undefined
      }
    },
  },
  methods: {
    disabledDate(current) {
      return current && current < moment().startOf('day')
    },
    getData() {
      organTopCountData({
        school_id: this.$store.state.user.school,
      })
        .then((res) => {
          this.topData = res
        })
        .catch((err) => {
          this.$message.error(err.data.message || '获取机构数据失败')
        })
      followUpCount(this.queryParam).then((res) => {
        this.followUpCount.unComplete = res.unComplete
        this.followUpCount.complete = res.complete
      })
      funnelChart({
        school_id: this.$store.state.user.school,
      })
        .then((res) => {
          this.funnelObj = res
          this.chartData.rows.forEach((val) => {
            if (val.state == '待跟进') {
              val.data = res.be_follow_up
            } else if (val.state == '跟进中') {
              val.data = res.following_up
            } else if (val.state == '已约课') {
              val.data = res.class_appointment
            } else if (val.state == '已体验') {
              val.data = res.experienced
            }
          })
        })
        .catch((err) => {
          this.$message.error(err.data.message || '获取销售漏斗数据失败')
        })

      toDoing({
        school_id: this.$store.state.user.school,
      })
        .then((res) => {
          this.toDoingThings = res
        })
        .catch((err) => {
          this.$message.error(err.data.message || '获取待办事项数据失败')
        })
      this.reloadPieCharts(1)
      this.reloadTortuousCharts(1)
    },
    // 环形图数据刷新
    reloadPieCharts(e) {
      this.loading = true
      ringChart({
        school_id: this.$store.state.user.school,
        type: e,
      })
        .then((res) => {
          this.chartDataPie.rows.forEach((val) => {
            if (val.type == '在读学员') {
              val.num = res.reading_students
            } else if (val.type == '潜在学员') {
              val.num = res.potential_students
            }
          })
          this.loading = false
        })
        .catch((err) => {
          this.$message.error(err.data.message || '获取学员组成数据失败')
        })
    },
    //折线图数据刷新
    reloadTortuousCharts(e) {
      // console.log(e)
      this.loading = true
      lineChart({
        school_id: this.$store.state.user.school,
        time_type: e
      })
        .then((res) => {
          let data = JSON.parse(JSON.stringify(res))
          let arr = []
          data.forEach((val) => {
            arr.push({
              date: val.date,
              新增学员: val.new,
              失效资源: val.invalid
            })
          })
          this.chartDataTortuous.rows = arr
          console.log(arr)
          this.loading = false
        })
        .catch((err) => {
          this.$message.error(err.data.message || '获取学员组成数据失败')
        })
    },
    //跟进表格
    followUpChange(e) {
      this.queryParam.type = e
    },
    //全部、我跟进的
    //添加跟进记录
    followUp(e) {
      this.studentID = e.student.id
      this.lastInfo = e.last
      this.form.follow_up_id = e.id
      this.creat_visible = true
    },
    removePic(a) {
      this.fileList.forEach((item, index) => {
        if (item.uid == a.uid) {
          this.fileList.splice(index, 1)
        }
      })
    },
    changeTime(date, dateString) {
      this.form.time = dateString
    },
    beforeUploadImg(file) {
      const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'
      if (!isJpgOrPng) {
        this.$message.error('只能上传jpg/png图片格式！')
        return
      }
      const isLt2M = file.size / 1024 / 1024 < 10
      if (!isLt2M) {
        this.$message.error('只能上传10MB以内的图片!')
        return
      }
      const _this = this
      const formData = new FormData()
      formData.append('file', file)
      formData.append('school_id', this.$store.state.user.school)
      this.btnLoading = true
      uploadPic(formData)
        .then((res) => {
          this.fileList.push({
            name: res.path,
            uid: this.fileList.length + 1,
            url: res.url,
          })
          this.btnLoading = false
        })
        .catch((err) => {
          this.btnLoading = false
          this.$message.error(err.data.message || '上传失败，请稍后重试~')
        })
      return false
    },
    sure() {
      this.$refs.ruleForm.validate((valid) => {
        if (valid) {
          this.btnLoading = true
          let params = JSON.parse(JSON.stringify(this.form))
          params.student_id = this.studentID
          params.img = []
          this.fileList.forEach((val) => {
            params.img.push(val.url)
          })
          if (this.time) {
            params.next_time = this.time.format('YYYY-MM-DD HH:mm')
          }
          studentFollowAdd(params)
            .then((res) => {
              this.$message.success('添加成功')
              this.getData()
              this.$refs.follow.refresh()
              this.creat_visible = false
              this.btnLoading = false
            })
            .catch((err) => {
              this.$message.error(err.data.message || '添加失败，请稍后重试')
              this.btnLoading = false
            })
        } else {
          return false
        }
      })
    },
  },
}
</script>

<style lang="less" scoped>
.lastFollow {
  padding: 0 16px 16px;
  border-radius: 4px;
  background: #fafafa;

  .title {
    padding: 8px 0;
    border-bottom: 1px dashed #ccc;
  }

  .userInfo {
    padding: 8px 0;
  }
}

.followUpAlert {
  border: 1px solid #91d5ff;
  border-radius: 5px;
  height: 32px;
  padding: 0 16px;
  line-height: 32px;
  background: #e6f7ff;
  margin-bottom: 15px;

  .followUpAlert_span {
    display: inline-block;
    margin-right: 20px;

    .followUpNum {
      display: inline-block;
      margin: 0 5px;
      color: #000;
      font-weight: 500;
    }
  }
}

// 顶部
.topData {
  .topDataTitle {
    margin-bottom: 20px;
  }

  .topDataDisplayFlex {
    display: flex;
    justify-content: space-between;

    .topDataDesc {
      width: 25%;
      height: 50px;
      margin-bottom: 20px;
      text-align: center;
      border-right: 1px solid #e8e8e8;

      .topDataDescPrice {
        font-size: 24px;
      }

      .topDataDescText {
        padding-top: 2px;
        font-size: 14px;
        margin-bottom: 15px;
        color: rgb(153, 153, 153);
      }
    }

    .topDataDesc:last-child {
      border-right: none;
    }
  }
}

// 快捷入口
.quickAccess {
  height: 300px;

  .quickAccess_top {
    span {
      display: inline-block;
      font-size: 18px;
      color: rgb(102, 102, 102);
    }

    display: flex;
    justify-content: space-between;
  }

  .quickAccess_content {
    display: flex;
    flex-wrap: wrap;
    padding: 0 20px;

    .quickAccess_content_element {
      display: flex;
      align-items: center;
      width: 30%;
      margin-right: 20px;
      margin-bottom: 20px;

      .quickAccess_content_element_small {
        cursor: pointer;
        display: flex;
        align-items: center;

        .rightContent {
          margin-left: 10px;
          text-align: center;
        }
      }

      .quickAccess_content_element_small:hover {
        box-shadow: 0 5px 15px rgba(232, 232, 232, 0.4);
        background: rgba(232, 232, 232, 0.4);
        transform: scale(1.05);
        border-radius: 5px;
      }
    }

    // .quickAccess_content_element:last{}
  }
}

// 待办事项
.backLog {
  height: 300px;
  overflow-y: auto;

  .backLog_title {
    display: inline-block;
    font-size: 18px;
    color: #666666;
  }

  // .backLog_list {
  //   margin-top: 16px;
  // }
}

//销售漏斗
.saleTitle {
  //标题
  font-size: 18px;
  color: #666666;
  margin-bottom: 10px;
}

.saleData {

  //漏斗
  .ve-funnel {
    left: -40px !important;
  }

  //折线统计
  .saleData_Tortuous {
    position: relative;

    .screen {
      position: absolute;
      top: 0;
      right: 0;
    }
  }
}

// 学员组成
.studentData {
  .studentData_title {
    font-size: 18px;
    color: #666666;
  }

  .studentData_Echarts {
    position: relative;

    .studentData_Echarts_select {
      position: absolute;
      top: 0;
      right: 0;
    }
  }
}

.pic-icon {
  float: left;
  margin-right: 10px;
  overflow: hidden;
  // text-align: center;
}

.fast-enter-icon {
  display: inline-block;
  width: 60px;
  height: 60px;
  background: url('../../assets/img/home/hone.png') no-repeat 50%;
  background-size: 100%;
  // background-position-x: 0;
}

.xygl {
  background-position: 0 -480px;
}

.xygl1 {
  background-position: 0 -120px;
}

.xygl2 {
  background-position: 0 -180px;
}

.xygl3 {
  background-position: 0 -360px;
}

.xygl4 {
  background-position: 0 0;
}

.xygl5 {
  background-position: 0 -300px;
}

.xygl6 {
  background-position: 0 -60px;
}

.xygl7 {
  background-position: 0 -420px;
}

.xygl8 {
  background-position: 0 -240px;
}
</style>
